索引/_update_by_query

{
  "script": {
    "source": "ctx._source['standSortOrder']=51"
  },
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "sortTitle.keyword": "QC/T"
          }
        }
      ],
      "must_not": [],
      "should": []
    }
  }
}



根据是否存在"ipsub"字段，如果不存在，给信息增加字段"ipsub"，并且赋值0
POST my_index / _update_by_query

{
	"script": {
		"source": "ctx._source['standSortOrder']=0"
	},
	"query": {
		"bool": {
			"must_not": [{
				"exists": {
					"field": "standSortOrder"
				}
			}]
		}
	}
}